package OneDayMoreThread;

public class Thread4 extends Thread{
    public int  num;
    public Thread4(int n){
     num=n;
    }

    @Override
    public void run() {
       int result=1;
        for (int i = 1; i <= num; i++) {
            result*=i;
        }
        System.out.println(num+"阶乘 = " + result);
    }
}
